package com.ntschy.common.core;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;
import java.util.Map;

/**
 * 实体基类
 * 子类的@Builder注解需要加在重写的构造方法上
 * @author ezreal_geng
 */
@Data
@ToString(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
public class BaseEntity implements Serializable {

    /**
     * 请求参数
     */
    @JsonIgnore
    @TableField(exist = false)
    private Map<String, Object> params;

    /**
     * 当前数据权限
     */
    @JsonIgnore
    @TableField(exist = false)
    private String currentDataScope;
}
